﻿<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="../helpproject.xsl" ?>
<topic template="Default" lasteditedby="Geert" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../helpproject.xsd">
  <title translate="true">Catel.MVVM</title>
  <body>
    <header>
      <para styleclass="Heading1"><text styleclass="Heading1" translate="true">Catel.MVVM</text></para>
    </header>
    <para styleclass="Normal"><text styleclass="Normal" translate="true">The last few years, MVVM has become the number one pattern to write applications using WPF, Silverlight, and Windows Phone 7. The actual pattern is very simple, but there are some flaws and questions lots of MVVM users have, such as:</text></para>
    <list id="5" type="ul" listtype="bullet" formatstring="&#183;" format-charset="SYMBOL_CHARSET" levelreset="true" legalstyle="false" startfrom="1" styleclass="Normal (list)" style="font-family:Symbol; font-size:10pt; color:#000000;">
      <li styleclass="Normal (list)"><text styleclass="Normal (list)" translate="true">How to show modal dialogs or message boxes inside a View-Model?</text></li>
      <li styleclass="Normal (list)"><text styleclass="Normal (list)" translate="true">How to run processes inside a View-Model?</text></li>
      <li styleclass="Normal (list)"><text styleclass="Normal (list)" translate="true">How to let the user select a file inside a View-Model?</text></li>
    </list>
    <para styleclass="Normal"><text styleclass="Normal" translate="true">In my opinion, this is where the good frameworks separate themselves from the bad ones. For example, people actually calling MessageBox.Show inside a View-Model are using the pattern wrong. If you are one of the developers that directly call a MessageBox inside a View-Model, ask yourself this: who is going to click the button during a unit test?</text></para>
    <para styleclass="Normal"><text styleclass="Normal" translate="true">Before we actually started developing Catel, we did lots of investigations to make sure that the MVVM pattern was really useful in Line of Business (LoB) applications and does not miss the finishing touch. Thanks to this investigation and research, we created a solid MVVM framework which solves all the known problems of the MVVM pattern.</text></para>
    <para styleclass="Normal"><text styleclass="Normal" translate="true">This part of the documentation explains all about the MVVM framework included with Catel. The MVVM framework that ships with Catel has the following characteristics and features:</text></para>
    <list id="6" type="ul" listtype="bullet" formatstring="&#183;" format-charset="SYMBOL_CHARSET" levelreset="true" legalstyle="false" startfrom="1" styleclass="Normal (list)" style="font-family:Symbol; font-size:10pt; color:#000000;">
      <li styleclass="Normal (list)"><text styleclass="Normal (list)" translate="true">Very easy to use, a view model is created within 10 minutes</text></li>
      <li styleclass="Normal (list)"><text styleclass="Normal (list)" translate="true">Direct pass-through of view model properties to Models</text></li>
      <li styleclass="Normal (list)"><text styleclass="Normal (list)" translate="true">Validation mapping from model to view model and back</text></li>
      <li styleclass="Normal (list)"><text styleclass="Normal (list)" translate="true">Solves the nested user controls problem</text></li>
    </list>
    <para styleclass="Normal"><text styleclass="Normal" translate="true">If you are not yet familiar with MVVM, it is advised to read a small introduction on </text><link displaytype="text" defaultstyle="true" type="weblink" href="http://en.wikipedia.org/wiki/Model_View_ViewModel" target="_blank" styleclass="Normal" translate="true">Wikipedia</link><text styleclass="Normal" translate="true">.</text></para>
    <para styleclass="Normal"><text styleclass="Normal" translate="true">Below are some important points that you might want to take a look at. Of course it&apos;s also possible to expand the MVVM part and view all the documentation.</text></para>
    <para styleclass="Heading1"><text styleclass="Heading1" translate="true">Basic functionality</text></para>
    <list id="7" type="ul" listtype="bullet" formatstring="&#183;" format-charset="SYMBOL_CHARSET" levelreset="true" legalstyle="false" startfrom="1" styleclass="Normal (list)" style="font-family:Symbol; font-size:10pt; color:#000000;">
      <li styleclass="Normal (list)"><link displaytype="text" defaultstyle="true" type="topiclink" href="ViewModelBase_explained" styleclass="Normal (list)" translate="true">ViewModelBase explained</link></li>
      <li styleclass="Normal (list)"><link displaytype="text" defaultstyle="true" type="topiclink" href="Creating_a_basic_view_model" styleclass="Normal (list)" translate="true">Creating a basic view model</link></li>
      <li styleclass="Normal (list)"><link displaytype="text" defaultstyle="true" type="topiclink" href="Creating_a_view_model_with_a_m" styleclass="Normal (list)" translate="true">Creating a view model with model and pass-through</link></li>
      <li styleclass="Normal (list)"><link displaytype="text" defaultstyle="true" type="topiclink" href="Creating_a_view_model_with_a_2" styleclass="Normal (list)" translate="true">Creating a view model with model without pass-through</link></li>
    </list>
    <para styleclass="Heading1"><text styleclass="Heading1" translate="true">Medium functionality</text></para>
    <list id="8" type="ul" listtype="bullet" formatstring="&#183;" format-charset="SYMBOL_CHARSET" levelreset="true" legalstyle="false" startfrom="1" styleclass="Normal (list)" style="font-family:Symbol; font-size:10pt; color:#000000;">
      <li styleclass="Normal (list)"><link displaytype="text" defaultstyle="true" type="topiclink" href="Commands" styleclass="Normal (list)" translate="true">Commands</link></li>
      <li styleclass="Normal (list)"><link displaytype="text" defaultstyle="true" type="topiclink" href="Commands_authentication" styleclass="Normal (list)" translate="true">Commands authentication</link></li>
      <li styleclass="Normal (list)"><link displaytype="text" defaultstyle="true" type="topiclink" href="Events_to_commands" styleclass="Normal (list)" translate="true">Events to commands</link></li>
      <li styleclass="Normal (list)"><link displaytype="text" defaultstyle="true" type="topiclink" href="Services" styleclass="Normal (list)" translate="true">Services</link></li>
      <li styleclass="Normal (list)"><link displaytype="text" defaultstyle="true" type="topiclink" href="Designers" styleclass="Normal (list)" translate="true">Designtime view model support</link></li>
    </list>
    <para styleclass="Heading1"><text styleclass="Heading1" translate="true">Advanced functionality</text></para>
    <list id="9" type="ul" listtype="bullet" formatstring="&#183;" format-charset="SYMBOL_CHARSET" levelreset="true" legalstyle="false" startfrom="1" styleclass="Normal (list)" style="font-family:Symbol; font-size:10pt; color:#000000;">
      <li styleclass="Normal (list)"><link displaytype="text" defaultstyle="true" type="topiclink" href="MVVM_behaviors" styleclass="Normal (list)" translate="true">UserControl logic as behavior</link></li>
      <li styleclass="Normal (list)"><link displaytype="text" defaultstyle="true" type="topiclink" href="Creating_a_view_model_that_wat" styleclass="Normal (list)" translate="true">Creating a view model that watches other view models</link></li>
      <li styleclass="Normal (list)"><link displaytype="text" defaultstyle="true" type="topiclink" href="Auditing" styleclass="Normal (list)" translate="true">Adding auditing to MVVM</link></li>
    </list>
  </body>
</topic>
